package com.cms.common.model.entity;

import lombok.Data;

import javax.persistence.*;

@Data
@Entity
public class Plugin extends BaseEntity {

    @Column(name = "plugin_id", nullable = false, length = 100, unique = true)
    private String pluginId;  // 插件唯一标识，如 com.cms.plugin.seo

    @Column(nullable = false, length = 100)
    private String name;  // 插件名称

    @Column(nullable = false, length = 50)
    private String version;  // 插件版本

    @Column(length = 500)
    private String description;  // 插件描述

    @Column(nullable = false, length = 100)
    private String author;  // 作者

    @Column(name = "type", nullable = false, length = 50)
    private String type;  // 插件类型，如 content, seo, payment 等

    @Column(columnDefinition = "TEXT")
    private String config;  // 插件配置，JSON格式

    @Column(length = 255)
    private String logo;  // 插件logo URL

    @Column(nullable = false)
    private Boolean enabled = false;  // 是否启用

    @Column(nullable = false)
    private String packageName;  // 插件包名字



} 